<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <!--                                                               -->
    <!-- Consider inlining CSS to reduce the number of requested files -->
    <!--                                                               -->
    <link type="text/css" rel="stylesheet" href="Kyuuri.css">

    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>NicoLiveWatcher</title>
    
    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
<!--    <script type="text/javascript" language="javascript" src="kyuuri/kyuuri.nocache.js"></script>-->
    
    <!-- Combo-handled YUI CSS files: -->  
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/assets/skins/sam/skin.css">   
	<!-- Combo-handled YUI JS files: -->  
<!--	<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/connection/connection-min.js&2.8.0r4/build/element/element-min.js&2.8.0r4/build/datasource/datasource-min.js&2.8.0r4/build/datatable/datatable-min.js"></script>  -->
    <script type="text/javascript" src="yui/yahoo/yahoo-debug.js"></script>
    <script type="text/javascript" src="yui/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="yui/connection/connection-debug.js"></script>
    <script type="text/javascript" src="yui/element/element-debug.js"></script>
    <script type="text/javascript" src="yui/datasource/datasource-debug.js"></script>
    <script type="text/javascript" src="yui/datatable/datatable-debug.js"></script>
    <style type="text/css"> 
/*margin and padding on body element
  can introduce errors in determining
  element position and are not recommended;
  we turn them off as a foundation for YUI
  CSS treatments. */
body {
	margin:0;
	padding:0;
}
/* custom styles for this example */ 
.modform {margin-bottom: 1em;} 
.index {width:5em;}  
</style>
 
  </head>

  <!--                                           -->
  <!-- The body can have arbitrary html, or      -->
  <!-- you can leave the body empty if you want  -->
  <!-- to create a completely dynamic UI.        -->
  <!--                                           -->
  <body class="yui-skin-sam">

    <h1>NicoLiveWatcher</h1>
    
    <div id="basic" align="center"></div>
<!--    <a href="kyuuri/textNicoLiveData">update</a>-->
<script type="text/javascript"> 
YAHOO.util.Event.addListener(window, "load", function() {
    YAHOO.example.XHR_XML = new function() {

        var formatUrl = function(elCell, oRecord, oColumn, sData) { 
        	 elCell.innerHTML = "<a href='http://live.nicovideo.jp/watch/"
            	 + oRecord.getData("guid") + "'>" + sData + "</a>"; 
       	}; 
    	
        var myColumnDefs = [
            {key:"guid", label:"guid", sortable:true},
            //{key:"title", label:"title", sortable:true},
            {key:"title", sortable:true, formatter:formatUrl},
            {key:"pub date", label:"date", sortable:true},
            {key:"view", label:"view", sortable:true}
        ];

        myDataSource = new YAHOO.util.DataSource("kyuuri/text");
        //myDataSource.responseType = YAHOO.util.DataSource.TYPE_XML;
        myDataSource.responseSchema = {
            recordDelim: "\n",
            fieldDelim: "|",
            fields: [ "guid", "title", "pub date", {key:"view", parser:"number"} ]
        };

        myDataTable = new YAHOO.widget.DataTable("basic", myColumnDefs,
                myDataSource);

        return {
            oDS: myDataSource,
            oDT: myDataTable
        };
    }();
});
</script>
  </body>
</html>
